"use strict";
const common_vendor = require("../../../../../../../common/vendor.js");
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "index",
  setup(__props) {
    const numchart = common_vendor.ref(null);
    const numcharttype = common_vendor.ref({
      categroies: ["5月27日", "5月28日", "5月29日", "5月30日", "5月31日", "6月1日", "6月2日"],
      data: [30, 40, 50, 40, 60, 50, 70]
    });
    common_vendor.onMounted(() => {
      if (numchart.value) {
        const mychart = common_vendor.init(numchart.value);
        window.addEventListener("resize", () => {
          mychart.resize();
        });
        const option = {
          grid: {
            containLabel: true,
            // 添加这一行
            x: 30,
            // 左
            y: 30,
            // 上
            x2: 30,
            // 右
            y2: 30
            // 下
          },
          tooltip: {
            trigger: "axis"
          },
          xAxis: {
            data: numcharttype.value.categroies,
            axisLabel: {
              interval: 0
              // 设置数据间隔
            }
          },
          yAxis: {
            name: "kg/m2",
            type: "value"
          },
          series: [{
            data: numcharttype.value.data,
            type: "line"
          }]
        };
        mychart.setOption(option);
      }
    });
    return (_ctx, _cache) => {
      return {};
    };
  }
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-bf12b609"]]);
wx.createComponent(Component);
